package org.example.service.impl;

import org.example.mapper.PhotoMapper;
import org.example.pojo.Photo;
import org.example.service.PhotoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PhotoServiceImpl implements PhotoService {

    @Autowired
    private PhotoMapper photoMapper;

    @Override
    public void addPhoto(String id, String url, String location) {
        photoMapper.addPhoto(id, url, location);
    }

    @Override
    public List<Photo> list(String id) {
        return photoMapper.list(id);
    }

    @Override
    public void deletePhoto(String id) {
        photoMapper.deletePhoto(id);
    }

    @Override
    public void deleteCoupleAlbumPhoto(String id) {
        photoMapper.deleteCoupleAlbumPhoto(id);
    }
}
